Control Settings This dialog resets control parameters that affect control type, behavior, and data linking. Changes made here are saved in the FWND in memory. Use "Save All to disk" to make changes permanent. Page 1 - Type & Behavior Driver - Each control in a ViewIt window is supported by a code resource that is either a CDEF or an FCMD "control driver". CDEFs are denoted by BaseID = CDEF ID and VersID = 0. Any CDEF based control can be used in a ViewIt window, but the most common ones used are Apple's standard button, check box, radio button, and scroll bar. FCMD control drivers are denoted by BaseID = FCMD ID and VersID = 10 x the driver's version number. Drivers shipped with ViewIt include: Name BaseID VersID Use BaseVw 1300 20 basic view BaseCt 1310 20 basic controls PeekCt 1390 20 debugging ScrapCt 1800 20 scrap display HelpCt 1900 20 on-line help ShellCt 7400 20 development All drivers are shipped with example controls that appear in ViewIt's import menu, so it is easy to experiment by adding these to any window. Control drivers support more powerful controls than CDEFs by taking advantage of the extended control record and message scheme implemented by ViewIt. These extensions are documented in the "Inside FaceWare" product which also includes source for all of the drivers listed above. To learn more about the operation of a driver, enter edit mode, select a control, open the Control dialog (the one you are now in), and press the "Driver Help" button below VarCode to open the driver's help. For BaseCt controls, the window opened is titled "About BaseCt" and describes all of the control types supported by the BaseCt driver. Behavior - One of the nifty features of ViewIt controls is that control behavior can often be set independently of the control's appearance. This means, for example, that an ICON-based control supported by BaseCt can act as either a button, check box, radio button, or static item, depending upon which "class" of behavior is chosen. Thus you should always examine the driver's on-line help (via the "Driver Help" button) to determine the full capabilities of controls. A short description of each class is presented to help clarify its use: • Static - displays text, icon, picture, etc., but does not become hilited or checked when clicked • Button - becomes hilited when clicked, but is never checked. Most button-type controls also have the "Return On Hit" option checked so that the main program is notified when they are hit. • Check Box - becomes hilited when clicked, and toggles between a checked and unchecked state. The checked state often corresponds to the control value = max value, and unchecked = min value. • Radio Button - similar to Check Box, except that adjacent radio buttons are mutually exclusive with respect to their being checked. This feature is actually supported by the BaseVw view driver which manages the checking/unchecking of radio buttons and check boxes after clicks in controls. • Dial Control - a control which contains an "indicator" that can be dragged to change the value of the control. • List or Menu - a control which displays a list of items, one or more of which can be selected. The item(s) selected usually have a relationship to the control's current value. • Editable - manages multiple, discrete items within the content area of the control which can usually be edited (such as the characters in a text editor). Only one editable control in a window can be "selected" at a time (just as only one window can be active). The currently selected, editable control receives all key and menu events. Messages Sent - Optional messages that ViewIt can send to control drivers. In most cases the example controls included with drivers will have these options preset correctly. See the driver's on-line help for more info. Briefly, • Idle - gets idle time when selected • Hook - called whenever no events pending • Scrap - notified if clipboard (scrap) changes • Heap - called when heap space needed • Save - given chance to save contents • Quit - disposed of before program quits • Active - notified if window is act/deactivated Keys Accepted - Determines whether the keys listed are sent to editable controls. In most cases the example controls included with drivers have these options preset correctly. See the driver's on-line help for more info. Returns On Hit - Causes an "item hit" event to be returned to the main program after a click occurs in the control. Most button-type controls should have this option checked. See "Windows" topic in the ViewIt Guide for more info. Is Default Item - Makes the control the default item in the window (the item "hit" when the Enter or Return key is pressed). The "Clear Others" button clears this flag for all other controls in the window. Note that the drawing of a ring around a default button is a separate option (set in Bounds dialog), that default items need not be standard buttons (the box at the top, left of this window is a default item), and that it sometimes makes sense to have more than one default item in a window (as long as only one of these is active & visible). Supports FSSC - Informs ViewIt that it should enable UtilIt's Font, Size, Style, and Color menus when an editable control is selected and the user attempts to choose a menu item. In most cases the example controls included with drivers have this option preset correctly. See the driver's on-line help for more info. Note that this option is not related to choosing a control's overall Font, Size, Style, or Color when in edit mode, but rather to choosing styles within a control's content when not in edit mode (like the text you are reading). Res Link - Optional link between the control and a resource. The basic control driver shipped with ViewIt, BaseCt, makes extensive use of this option to support many different types of controls. Some control drivers, and all standard CDEFs, however, ignore the resource Type and ID fields. Always examine the driver's on-line help to determine whether and how the Type and ID fields are used. Values - The standard control values associated with all Macintosh controls (Min = "contrlMin", Max = "contrlMax", and Value = "contrlValue"). Many drivers make use of these values, but others do not, so always examine the driver's on-line help to determine how these values are used. Also note that ViewIt supports a powerful data linking scheme that does not restrict control "values" to integers (see "Data Links" in the ViewIt Guide). VarCode - A 16-bit (2-byte) field that can be used by drivers and CDEFs to store additional, control-specific information. Most drivers use the VarCode as a set of bit flags that turn on or off various control features. These flags will be documented in the driver's on-line help. RefCon - A 4-byte integer reserved for use by the main program (although some custom CDEFs have also been known to make use of this field). Page 2 - Strings & Links Title - The control's title (= the "contrlTitle" associated with Macintosh controls). Some control drivers and CDEFs display this text as part of the control, others do not. This is the same text edited by ViewIt's Title dialog. Instructions - An optional string used by some control drivers. View controls supported by the BaseVw driver, for example, use this string as an instruction to activate/inactivate or show/hide daughter controls (see "Views" topic in the ViewIt Guide). Data Link - Establishes link between a program variable and the control value. See "Data Links" topic in the ViewIt Guide for more info. (Note that a value of -1 for "Byte Offset" indicates that the main program used LnkCtl to link this control to an isolated program variable.) Override ID - Optional number that identifies an override procedure to use from a table of such procedures created by the main program. See the "Override" topic in the ViewIt Guide for more info on override procedures.